主题
获取绑定窗口缩放比例 - GetScaleFromWindows
函数简介
获取绑定窗口缩放比例。
接口名称
GetScaleFromWindowsDLL调用
double GetScaleFromWindows(long ola, long hwnd);参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| hwnd | 长整数型 | 窗口句柄。 |
示例
SDK 调用
cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
double value = ola.GetScaleFromWindows(hwnd);csharp
using OLAPlug;
var ola = new OLAPlugServer();
double value = ola.GetScaleFromWindows(hwnd);python
from OLAPlugServer import OLAPlugServer
ola = OLAPlugServer()
value = ola.GetScaleFromWindows(hwnd)java
import com.olaplug.OLAPlugServer;
OLAPlugServer ola = new OLAPlugServer();
double value = ola.GetScaleFromWindows(hwnd);cpp
var ola = com("OlaPlug.OlaSoft")
var value = ola.GetScaleFromWindows(hwnd)vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
value = ola.GetScaleFromWindows(hwnd)text
.局部变量 ola, OLAPlug
ola.创建 ()
value = ola.GetScaleFromWindows(hwnd)aardio
import OLAPlugServer;
var ola = OLAPlugServer();
var value = ola.GetScaleFromWindows(hwnd);text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
双精度 value = ola.GetScaleFromWindows(hwnd)cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
double value = ola.GetScaleFromWindows(hwnd);原生 DLL 调用
cpp
long instance = CreateCOLAPlugInterFace();
GetScaleFromWindows(instance, hwnd);csharp
using System.Runtime.InteropServices;
using System.Text;
[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern long CreateCOLAPlugInterFace();
[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern int GetScaleFromWindows(long ola, long hwnd);
long instance = CreateCOLAPlugInterFace();
GetScaleFromWindows(instance, hwnd);python
from ctypes import CDLL, c_int, c_int64, create_string_buffer
ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
instance = ola.CreateCOLAPlugInterFace()
ola.GetScaleFromWindows(instance, hwnd)返回值
双精度浮点数:窗口的缩放比例,例如 0.8。
